import request from '@/utils/request'

// 查询题组管理列表
export function listQuestionGroup(query) {
  return request({
    url: '/examination/questionGroup/list',
    method: 'get',
    params: query
  })
}

// 查询题组管理详细
export function getQuestionGroup(groupId) {
  return request({
    url: '/examination/questionGroup/' + groupId,
    method: 'get'
  })
}

// 新增题组管理
export function addQuestionGroup(data) {
  return request({
    url: '/examination/questionGroup',
    method: 'post',
    data: data
  })
}

// 修改题组管理
export function updateQuestionGroup(data) {
  return request({
    url: '/examination/questionGroup',
    method: 'put',
    data: data
  })
}

// 删除题组管理
export function delQuestionGroup(groupId) {
  return request({
    url: '/examination/questionGroup/' + groupId,
    method: 'delete'
  })
}



// 列表
export function getListInfo(query) {
  return request({
    url: '/examination/questionGroup/getList',
    method: 'get',
    params: query
  })
}


//题组关联题目
export function associationQuestion(data) {
  return request({
    url: '/examination/questionGroup/associationQuestion',
    method: 'put',
    data: data
  })
}


//取消关联
export function cancelAssociationQuestion(data) {
  return request({
    url: '/examination/questionGroup/cancelAssociationQuestion',
    method: 'put',
    data: data
  })
}


